
#region Imports

using System;
using System.Collections.Generic;
using System.Reflection;

using Justa.Reflection;

#endregion

namespace Justa.Aspect
{
    /// <summary>
    /// 
    /// </summary>
    /// 
    /// <author>Abel Perez</author>
    /// 
    public class JoinPoint : MethodInvocation
    {
        /// <summary>
        /// 
        /// </summary>
        /// 
        private object proxy;

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="target"></param>
        /// <param name="proxy"></param>
        /// <param name="method"></param>
        /// <param name="arguments"></param>
        /// 
        public JoinPoint(object target, object proxy, MethodInfo method, object[] arguments)
            : base(target, method, arguments)
        {
            if (proxy == null)
            {
                throw new ArgumentException("Specified Proxy is null.");
            }

            this.proxy = proxy;
        }

        /// <summary>
        /// 
        /// </summary>
        /// 
        public object Proxy
        {
            get { return proxy; }
        }
    }
}